-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
editoast: refactor infra tests part 7 #7932
Conversation
Codecov ReportAttention: Patch coverage is
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## dev #7932 +/- ##
============================================
- Coverage 28.25% 28.21% -0.05%
Complexity 2075 2075
============================================
Files 1276 1276
Lines 156193 156314 +121
Branches 3084 3084
============================================
- Hits 44136 44102 -34
- Misses 110216 110371 +155
Partials 1841 1841
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm curious about why we do need a lot of #[serial_test::serial]
in commit 3040c34.
Also, I'd like to be convinced that removing futures::try_join_all!()
is fine. But to me, it should affect the time of execution for persist_railjson
unless I'm missing something.
Apart from that, great work in separating commits in this PR. Thank you, it really eased the review for this big PR.
I added |
9d078dc
to
281e005
Compare
fc3d06d
to
f8d2164
Compare
We dug a little bit to try to understand. It's a deadlock detected by the Postgresql instance itself. It might be due to concurrence on the generated id for infras since we do create very long transactions when working with infras in tests. We did not find an obvious solution to work around the problem. Let's keep it like this. |
f8d2164
to
96e803f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this work! PoolV1 is almost gone! 😄
c6d6900
to
4797493
Compare
f0012b4
to
584d0d3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the changes! A few more and 🚀
I'll test your PR on Monday.
There are commits like merge branch dev
or rebase
in your history. Those will need to be squashed.
a202f91
to
ef3ef96
Compare
ef3ef96
to
f0c0ee5
Compare
aea5510
to
5136146
Compare
5136146
to
6b5fd5a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job and thank you for the investigation of the deadlocks bug and for rearranging the history!
Once this is merged we'll need to check that all non-TSV1 endpoints are using DbPoolV2
and that we didn't miss any test that was using TestFixture
.
After that we can probably work on making the DbConnection
opaque to allow us to remove any diesel
from views
:)
Part of #6980
It's better to review the PR commit by commit.
I created intermediate functions
{function}_v2
to facilitate the migration, but I deleted everything at the end.I also refactored
persist_railjson
to useDbConnection
directly instead ofDbConnectionPool
. Consequently, I removed the macropersist!
that was in there andfutures::try_join!
, and I added a transaction.